﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductsList.aspx.cs" Inherits="FYPHP.ProductsList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <asp:Repeater ID="ItemList" runat="server" EnableViewState="False">
       
<HeaderTemplate>
<h2>Products Listing</h2>
<table cellpadding="5" cellspacing="5" width="722" border="1px solid #ffffff" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center; margin-top: 10px;">
 <tr style="background-color: #eee; font-weight: bold;"><td>Picture</td><td>Product Name</td><td>Category</td><td>Price</td><td>Views</td><td>Seller</td></tr>

</HeaderTemplate>

<ItemTemplate>
     <tr>
            <td align="center" width="50">
            <img src="/uploads/products/<%#DataBinder.Eval(Container.DataItem, "p_picture" ) %>" alt="" height="40px" width="40px" />
            </td>
            <td style="text-align: left"><a href="/ProductDetails.aspx?id=<%#DataBinder.Eval(Container.DataItem, "p_id" ) %>">
            <%#DataBinder.Eval(Container.DataItem, "p_name" ) %></a><br /> 
            <i style="font-size:11px;"><%#DataBinder.Eval(Container.DataItem, "des" ) %></i></td>
            <td width="70"><a href="/ProductsByCategory.aspx?id=<%#DataBinder.Eval(Container.DataItem, "cat_id" ) %>"><%#DataBinder.Eval(Container.DataItem, "cat_name" ) %></a></td>
            <td width="70">$<%#DataBinder.Eval(Container.DataItem, "p_price" ) %></td>
            <td width="25"><%#DataBinder.Eval(Container.DataItem, "p_views" ) %></td>
            <td width="70"><%#DataBinder.Eval(Container.DataItem, "username" ) %>
            </td>
        </tr>
       
   </ItemTemplate>

   <FooterTemplate>
   
    </table>
    </FooterTemplate>
</asp:Repeater>
</asp:Content>
